<div class="content">
    <div class="nav" role="navigation">
        <ul id="nav-menu" class="nav-menu">
            <li class="nav-toggle">
                <div id="toggle-icon" class="toggle-icon" aria-controls="#nav-list" aria-expanded="false">
                    <i class="fa fa-bars"></i>
                </div>
            </li>
            <li class="signin-toggle">
                <a data-sign="0" href="/login_view" id="signin-icon" class="user-signin" aria-controls="#sign" aria-expanded="false"><i class="fa fa-user"></i></a>
            </li>
            <li class="home-logo"><a href="${request.contextPath!}/"></a></li>
        </ul>
        <ul id="nav-list" class="nav-list">
            <li id="logo"><a href="${request.contextPath!}/"></a></li>
            <li><a href="${request.contextPath}/topics">文章</a></li>
            <li><a href="#">欣赏</a></li>
            <li><a href="#">发现</a></li>
            <li><a target="_blank" href="#">唯然</a></li>
            <li><a>更多</a>

                <!--<ul class="sub-menu">-->
                    <!--<li><a href="http://www.jiawin.com/about-us">关于听说</a></li>-->
                    <!--<li><a href="http://www.jiawin.com/contact-us">留言联系</a></li>-->
                <!--</ul>-->
            </li>
            <#if user?exists>
                <li id="login-reg">
                    <div><img src="${user.profileImage!}" width="40" height="40" class="head_image"></div>
                    <div class="user-panel">
                        <a class="username">${user.displayName!}</a>
                        <a href="/article/edit" target="_blank" >发表文章</a>
                        <a href="#" id="login-out" onclick="loginout()">退出账号</a>
                    </div>
                </li>

            <#else>
                <li id="login-reg">
                    <div><a data-sign="0"  href="/login_view" class="login_btn" id="login_btn">登录</a></div>
                    <div><a data-sign="1"  href="/signup_view" >注册</a></div>
                </li>
            </#if>
            <li id="search" role="search">
                <form method="get" id="searchform" action="https://www.tinshow.com/search">
                    <div class="search-input-wrapper">
                        <span class="search-icon"><i class="fa fa-search"></i></span>
                        <input type="search" class="search-input" name="q" id="bdcs" value="" placeholder="输入关键词搜索..." autocomplete="off" />
                        <button type="submit" class="search-submit" id="search-submit" ></button>
                    </div>
                </form>
            </li>
        </ul>
    </div>
</div>

<script type="text/javascript">
    function loginout(){
        location.href = "/loginout?referUrl=" + window.location.href;
    }
</script>

